package com.example.port.mapper;

import com.example.port.entity.FeeRule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FeeRuleMapper {
    
    int insert(FeeRule feeRule);
    
    List<FeeRule> selectAll();
    
    FeeRule selectById(Integer id);
    
    int update(FeeRule feeRule);
    
    int delete(Integer id);
    
    // 获取最大规则ID
    Integer getMaxRuleId();
    
    // 检查规则是否被仓储费用引用
    int countStorageFeesByRuleId(@Param("ruleId") Integer ruleId);
} 
